Sorts a field on a data access page in descending order.
expression.SortDescending
expression Required. An expression that returns a DataPage object.
This method relies upon the current selection on the data access page to determine the field to sort by. Therefore, you must set the focus to the field to sort by, when the procedure containing this method is invoked by a control on the data access page, such as a command button.
This example sorts the ProductName field in descending order.
Sub SortProductNameDescending()
' Set focus to the control for the ProductName field.
MSODSC.Datapages(0).FirstSection.HTMLContainer.Children("ProductName").Focus
' Sort the field in descending order.
MSODSC.DataPages(0).SortDescending
End Sub